<template>
  <div id="app">
      <Child v-for="(item,index) in data" :key="index" :item="item" @active="next"></Child>
  </div>
</template>

<script>
import axios from "axios"
import Child from "./components/HelloWorld"
export default {
  data(){
    return {
        data:[],
        Ind:"ws"
    }
  },
  created(){
    axios.get("/list").then((res) => {
        if(res.data.code == 0){
          this.data = res.data.asg
        }
    });
  },
  components:{
    Child
  },
  methods:{
    next(ind){
      this.Ind = ind
      console.log(this.Ind)
    }
  }
}
</script>

<style>

</style>
